package main.model;

import java.util.HashMap;

import y.base.Edge;

/**
 * bean holds the priors of edges appearing in the training data and the prior for all the 
 * other edges which don't appear in the training data
 * 
 * @author YuanAn
 *
 */
public class EdgePriors {

	private HashMap<Edge, Double> priors; //priors for appearing edges
	private double dummyPrior;//the prior for all the other edges
	
	public EdgePriors(){
		
		priors = new HashMap<Edge, Double>();
		
		dummyPrior = 0.0;
		
	}
	
	//getters and setters
	
	public void put(Edge e, double p){
		priors.put(e, p);
	}
	
	public Double get(Edge e){
		return priors.get(e);
	}
	
	public HashMap<Edge, Double> getPriors(){
		return priors;
	}
	
	public void setDummyPrior(double dp){
		dummyPrior = dp;
	}
	
	public double getDummyPrior(){
		return dummyPrior;
	}
	
}
